package com.zeldu.exam.service.serviceimpl;

import com.zeldu.exam.mapper.StudentExamDao;
import com.zeldu.exam.pojo.StudentExam;
import com.zeldu.exam.service.StudentExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentExamServiceImpl implements StudentExamService {
    @Autowired(required = false)
    private StudentExamDao studentExamDao;
    @Override
    public List<StudentExam> queryBystudentId(Long id) {
        return studentExamDao.queryBystudentId(id);
    }

    @Override
    public List<StudentExam> queryByExamId(Long id) {
        return studentExamDao.queryByExamId(id);
    }

    @Override
    public int insertScore(StudentExam studentExam) {
        return studentExamDao.insertScore(studentExam);
    }

    @Override
    public int insert(StudentExam studentExam) {
        return studentExamDao.insert(studentExam);
    }

    @Override
    public String findContextByExamidAndStudentid(Long student_id, Long exam_id) {
        return studentExamDao.findContextByExamidAndStudentid(student_id,exam_id);
    }
}
